<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link th:href="@{/erp/assets/css/bootstrap.min.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{/erp/css/style.css}"/>
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace.min.css}"/>
    <link rel="stylesheet" th:href="@{/erp/assets/css/font-awesome.min.css}"/>
    <link rel="stylesheet" th:href="@{/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css}" type="text/css">
    <link th:href="@{/erp/Widget/icheck/icheck.css}" rel="stylesheet" type="text/css"/>
    <!--[if IE 7]>
    <link rel="stylesheet" th:href="@{/erp/assets/css/font-awesome-ie7.min.css}"/>
    <![endif]-->
    <!--[if lte IE 8]>
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace-ie.min.css}"/>
    <![endif]-->
    <script th:src="@{/erp/js/jquery-1.9.1.min.js}"></script>
    <script th:src="@{/erp/assets/js/bootstrap.min.js}"></script>
    <script th:src="@{/erp/assets/js/typeahead-bs2.min.js}"></script>
    <!-- page specific plugin scripts -->
    <script th:src="@{/erp/assets/js/jquery.dataTables.min.js}"></script>
    <script th:src="@{/erp/assets/js/jquery.dataTables.bootstrap.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.admin.js}"></script>
    <script th:src="@{/erp/assets/layer/layer.js}" type="text/javascript"></script>
    <script th:src="@{/erp/assets/laydate/laydate.js}" type="text/javascript"></script>
    <script type="text/javascript" th:src="@{/erp/Widget/zTree/js/jquery.ztree.all-3.5.min.js}"></script>
    <script th:src="@{/erp/js/lrtk.js}" type="text/javascript"></script>
    <title>自动分配</title>

</head>

<body>

<div class="margin clearfix">
    <div class="stystems_style">
        <div class="tabbable">
            <div class="page-content clearfix">
                <div id="Member_Ratings">
                    <div class="d_Confirm_Order_style">
                        <ul class="nav nav-tabs" id="myTab">
                            <li class="active">
                                <a data-toggle="tab" href="#home"><i class="green fa fa-home bigger-110"></i>自动分配</a></li>
                        </ul>
                    </div>
                    <div class="tab-content">

                        <div id="home" class="tab-pane active">
                            <!---->
                            <div class="border clearfix">
                                <span class="l_f">
                                <a href="javascript:;" id="dayin" class="btn btn-success">确定打印</a>
                                <a href="/production/laser/sc_jgmPage" class="btn btn-info">取消</a>
                                </span>
                            </div>
                            <table class="table table-striped table-bordered table-hover sample-table" id="sample-table">
                                <thead>
                                <tr>
                                    <th width="130">打印任务流水号</th>
                                    <th width="120">订单编号</th>
                                    <th width="140">激光码</th>
                                    <th width="80">状态</th>
                                    <th width="80">打印机</th>
                                </tr>
                                </thead>
                                <tbody>
                                    <tr th:each="x : ${iOrderLaserList}">
                                        <td th:text="${x.id}"></td>
                                        <td th:text="${x.orderNo}"></td>
                                        <td th:text="${x.olCode}"></td>
                                        <td th:text="${x.olStatus}"></td>
                                        <td th:text="${x.printer}"></td>
                                    </tr>
                                </tbody>
                            </table>
                            自动分配闲时打印机
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    jQuery(function($) {

        /*开始打印*/
        $('#dayin').on('click', function(){
            $.ajax({
                url:'/laser/confirmPrinting',
                type:'get',
                dataType:'json',
                contentType : "application/json;charsetset=UTF-8",
                success:function (data) {
                    if (data.rs){
                        layer.msg("操作成功", {
                            icon: 1,
                            time: 1000,
                            end : function () {
                                window.location.href="/production/laser/sc_jgmPage";
                            }
                        });

                    }else {
                        layer.msg(data.msg, {icon: 2, time: 2000});
                    }
                }
            })
        });

    })

</script>
